module top_module (
    input too_cold,
    input too_hot,
    input mode,
    input fan_on,
    output heater,
    output aircon,
    output fan
); 

    assign fan = fan_on || heater || aircon;
    assign {heater, aircon} = mode ? (too_cold ? 2'b10 : 2'b00) : (too_hot ? 2'b01 : 2'b00);
    
endmodule
